<template>
  <div class="shows">
    <div class="container">
      <div class="filter-bar">
        <div class="filter-item">
          <span class="label">分类：</span>
          <el-radio-group v-model="filters.category" size="small">
            <el-radio-button label="all">全部</el-radio-button>
            <el-radio-button label="concert">演唱会</el-radio-button>
            <el-radio-button label="drama">话剧歌剧</el-radio-button>
            <el-radio-button label="sports">体育赛事</el-radio-button>
            <el-radio-button label="exhibition">展览休闲</el-radio-button>
          </el-radio-group>
        </div>
        <div class="filter-item">
          <span class="label">时间：</span>
          <el-radio-group v-model="filters.time" size="small">
            <el-radio-button label="all">全部</el-radio-button>
            <el-radio-button label="today">今天</el-radio-button>
            <el-radio-button label="tomorrow">明天</el-radio-button>
            <el-radio-button label="weekend">周末</el-radio-button>
            <el-radio-button label="thisMonth">本月</el-radio-button>
          </el-radio-group>
        </div>
        <div class="filter-item">
          <span class="label">价格：</span>
          <el-radio-group v-model="filters.price" size="small">
            <el-radio-button label="all">全部</el-radio-button>
            <el-radio-button label="0_100">≤100元</el-radio-button>
            <el-radio-button label="100_300">100-300元</el-radio-button>
            <el-radio-button label="300_500">300-500元</el-radio-button>
            <el-radio-button label="500_up">500元以上</el-radio-button>
          </el-radio-group>
        </div>
      </div>

      <div class="show-list">
        <el-row :gutter="20">
          <el-col :xs="12" :sm="8" :md="6" v-for="show in shows" :key="show.id">
            <el-card class="show-card mb-20" :body-style="{ padding: '0px' }">
              <div class="show-poster">
                <img :src="show.poster" :alt="show.title">
                <div class="show-category">{{ show.category }}</div>
              </div>
              <div class="show-info">
                <h3 class="show-title">{{ show.title }}</h3>
                <p class="show-time">{{ show.time }}</p>
                <p class="show-venue">{{ show.venue }}</p>
                <div class="show-price">
                  <span class="price-label">¥</span>
                  <span class="price-number">{{ show.minPrice }}</span>
                  <span class="price-text">起</span>
                </div>
                <el-button type="danger" @click="goToShow(show.id)">购票</el-button>
              </div>
            </el-card>
          </el-col>
        </el-row>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Shows',
  data() {
    return {
      filters: {
        category: 'all',
        time: 'all',
        price: 'all'
      },
      shows: [
        {
          id: 1,
          title: '2024周杰伦演唱会',
          poster: require('@/assets/images/周杰伦演唱会.jpg'),
          category: '演唱会',
          time: '2024.04.15 周一 19:30',
          venue: '北京工人体育场',
          minPrice: 380
        },
        {
          id: 2,
          title: '《雷雨》话剧演出',
          poster: require('@/assets/images/雷雨话剧演出.jpg'),
          category: '话剧歌剧',
          time: '2024.04.20-21',
          venue: '国家大剧院',
          minPrice: 180
        },
        {
          id: 3,
          title: 'NBA中国赛',
          poster: require('@/assets/images/NBA中国赛.jpg'),
          category: '体育赛事',
          time: '2024.05.01 周三 19:30',
          venue: '五棵松体育馆',
          minPrice: 280
        },
        {
          id: 4,
          title: '梵高画展',
          poster: require('@/assets/images/梵高画展.gif'),
          category: '展览休闲',
          time: '2024.04.01-04.30',
          venue: '北京时代美术馆',
          minPrice: 120
        }
      ]
    }
  },
  methods: {
    goToShow(id) {
      this.$router.push(`/show/${id}`)
    }
  }
}
</script>

<style scoped>
.filter-bar {
  background: #fff;
  padding: 25px;
  margin-bottom: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.filter-item {
  margin-bottom: 20px;
}

.filter-item:last-child {
  margin-bottom: 0;
}

.label {
  color: #333;
  font-weight: 500;
  margin-right: 15px;
}

.show-card {
  margin-bottom: 20px;
  transition: all 0.3s;
  border: none;
  border-radius: 12px;
  overflow: hidden;
}

.show-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(43,134,197,0.15);
}

.show-poster {
  height: 400px;
  overflow: hidden;
  position: relative;
}

.show-poster::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
}

.show-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.show-card:hover .show-poster img {
  transform: scale(1.05);
}

.show-category {
  position: absolute;
  left: 15px;
  top: 15px;
  background: linear-gradient(135deg, #2b86c5 0%, #1a5f8d 100%);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(43,134,197,0.3);
}

.show-info {
  padding: 20px;
  background: #fff;
}

.show-title {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: #333;
  font-weight: 600;
  line-height: 1.4;
  height: 50px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.show-time,
.show-venue {
  margin: 8px 0;
  font-size: 14px;
  color: #666;
  display: flex;
  align-items: center;
}

.show-time::before,
.show-venue::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: #2b86c5;
  border-radius: 50%;
  margin-right: 8px;
}

.show-price {
  margin: 15px 0;
  color: #2b86c5;
  display: flex;
  align-items: baseline;
}

.price-label {
  font-size: 15px;
}

.price-number {
  font-size: 24px;
  font-weight: bold;
  margin: 0 4px;
  background: linear-gradient(135deg, #2b86c5 0%, #1a5f8d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.price-text {
  font-size: 13px;
  color: #999;
}

.el-button {
  width: 100%;
  border-radius: 25px;
  font-size: 16px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5253 100%);
  border: none;
  transition: all 0.3s ease;
}

.el-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(238,82,83,0.3);
}

.el-radio-button__inner {
  transition: all 0.3s ease;
}

.el-radio-button__orig-radio:checked + .el-radio-button__inner {
  background: linear-gradient(135deg, #2b86c5 0%, #1a5f8d 100%);
  border-color: #1a5f8d;
  box-shadow: 0 2px 8px rgba(43,134,197,0.3);
}
</style> 